package com.slwish.xty.db;

import com.slwish.xty.entity.HistorySearchModel;

import org.litepal.crud.DataSupport;

import java.util.List;

/**
 * 登录用户数据库操作类
 * 创建人：陈浩
 * 创建时间：2017/9/25
 */

public class HistorySearchDb {
    public static List<HistorySearchModel> query(String userId) {
        List<HistorySearchModel> list = DataSupport.where("userid = ?", userId).find(HistorySearchModel.class);
        return list;

    }

    public static void delete(long userId) {
        DataSupport.deleteAll(HistorySearchModel.class, "userid = ?", userId + "");

    }
}
